package com.cbs.management.mapper;
import java.io.Serializable;
import com.cbs.management.model.*;
import com.cbs.management.dto.*;
public class StaffRequestMapper  implements Serializable {
    public StaffRequest dtoToPersistence(StaffRequestDTO dto){
        if(dto == null){
           return null;
        }
        StaffRequest ret = new StaffRequest();
        ret.setId(dto.getId());
        ret.setDateCreate(dto.getDateCreate());
        ret.setStaffId(dto.getStaffId());
        ret.setReason(dto.getReason());
        ret.setStatus(dto.getStatus());
        ret.setEndDate(dto.getEndDate());
        return ret;
    }
    public StaffRequestDTO persistentToDto(StaffRequest model){
        if(model == null){
           return null;
        }
        StaffRequestDTO ret = new StaffRequestDTO();
        ret.setId(model.getId());
        ret.setDateCreate(model.getDateCreate());
        ret.setStaffId(model.getStaffId());
        ret.setReason(model.getReason());
        ret.setStatus(model.getStatus());
        ret.setEndDate(model.getEndDate());
        return ret;
    }
    public StaffRequestMapper (){}
    
}    